<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>SpaceCompany</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head>


<body class="container-xl">
<div th:insert="~{parts/navbar :: navbar}"></div>


<div class="position-absolute top-50 start-50 translate-middle">
    <p class="fs-1">Hi,
        <span th:text="${#authorization.expression('isAuthenticated()')} ? ${#authentication.principal.username} : 'guest' "></span>
    </p>
    <a th:if="!${#authorization.expression('isAuthenticated()')}"
       class="link-success link-offset-2 link-underline-opacity-25 link-underline-opacity-100-hover"
       href="/login">sign in</a>

    <ul th:if="${#authorization.expression('isAuthenticated()')}" class=" list-group list-group-flush mt-5">
        <a class="list-group-item" href="/clients">Clients</a></li>
        <a href="/accesses" class=" list-group-item">Accesses</a></li>
    </ul>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
        crossorigin="anonymous"></script>
</body>
</html>